<?php 
include '../data/data.php';
$user=$_SESSION['user']; //获取到的用户名
$pass=$_SESSION['pass']; //获取到的密码
$result= mysql_query("SELECT * FROM user WHERE username='$user' and password='$pass'", $link);  
$row = mysql_fetch_array($result);
if($row[id]==''){
	header('location:/user/login.html?fwd=/user/paylogs.html');
}
?>
<html><head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>充值记录 - <?php echo $rowx[name]; ?></title>
<link rel="stylesheet" href="/public/styles/base.css">
<link rel="stylesheet" href="/styles/pay_list.css">
    <link rel="stylesheet" href="/css/new.css">
</head>
<body class="bg00">
<!--div.container 总外框 充值列表 start-->
<div class="z_container bg01">
    <header class="z_header">
        <div class="toptil">
            <a href="/user/user.html"><img src="/picture/icon_20.png" alt=""></a>
            <p>充值记录</p>
        </div>
    </header>

    <!--div.z_min 内容区域 statr-->
    <div class="z_main" data-role="conent">
        <section class="pay_list">
            <ul class="list_header">
                <li style="background: #F4F4F4;">
                    <span>充入账号</span>
                    <span>充入方式</span>
                    <span class="bold">金额</span>
                    <span class="bold">时间</span>
                </li>
              <?php  
$result = $conn->query("SELECT id, money, date FROM cdk WHERE user='$user' ORDER BY id DESC limit 20");
 
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
      if($row[money]=='9999'){
      $xtl='<font color="red">包站卡</font>';
      $money='0';
      }else{
      $xtl='充值卡';
      $money=$row[money];
      }
        echo '<li >
                    <span>'.$user.'</span>
                    <span>'.$xtl.'</span>
                    <span class="bold">'.$money.'</span>
                    <span class="bold">'.$row[date].'</span>
                </li>';
    }
}else{
   echo '还没有提交问题喔！';
}
?> 
                 
            </ul>

            <ul class="list_body">
                <li>
                    <a id="show_more" href="javascript:void(0)"><span>没有更多了...</span></a>
                </li>
            </ul>
        </section>
        <div class="footer_padding"></div>
    </div>
    <!--div.z_min 内容区域 end-->
</div>
<!--div.container 总外框  end-->
<!--footer 底部 start-->
<footer id="footer" class="z_footer" style="">
    <nav>
        <a target="_top" href="/index.html" style="margin-left: 2%;" >
            <p class="img_1"><img src="/picture/home.png" alt=""></p>
            <p class="img_2"><img src="/picture/home1.png" alt=""></p>
            <span>首页</span>
        </a>
        <a target="_top" href="/game/type.html?tc=GM" >
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>GM</span>
        </a>
        <a target="_top" href="/game/game.html?tc=rm" title="">
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>BT</span>
        </a>
        <a target="_top" href="/user/user.html" title="" id="footer_nav_active">
            <p class="img_1"><img src="/picture/user.png" alt=""></p>
            <p class="img_2"><img src="/picture/user1.png" alt=""></p>
            <span>我的</span>
        </a>
    </nav>
</footer>
<link href="/css/app.css" rel="stylesheet" type="text/css">
<div id="weixin_an" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="/public/channel/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="/public/channel/menu_android.png">打开菜单</span>
        <span class="span2 android_open"><em>2</em> 选择<img src="/public/channel/android.png"></span>
        <span class="span2 android_open"><em>3</em> 重新登录账号充值</span>
    </div>
</div>
<!--二维码-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.qrcode.min.js"></script>

<!--<div class="qrcode_image">-->
<!--        <img src="/qrcode/game.html?addr=--><!--">-->
<!--</div>-->
<script>

    /**
     * 统计
     */
    function countDownload(obj,appid){
        // $.post("/index/game/countgame",{game_id:game_id},function(result){
        //     console.log(result);
        // });
        var ua = navigator.userAgent.toLowerCase();
        if (/iphone|ipad|ipod/.test(ua)) {
            if (appid == 100) {
                $(obj).attr('href', '#');
                alert('苹果手机不能下载安卓包哦，请选择h5游戏玩。');
                return;
            }
        } else if (/android/.test(ua)) {
            if (appid == 101) {
                $(obj).attr('href', '#');
                alert('安卓手机不能下载苹果包哦！');
                return;
            }
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
            $(obj).attr('href', '#');
            $('#weixin_an').show();
            }
        }
    };
    // var is_weixin = (function(){return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1})();
    // window.onload = function() {
    //     if (is_weixin) {
    //         $('#weixin_an').show();
    //     }
    // }
</script>

<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.mobile.min.js"></script>

</body></html>